#60 validate function