updated validation functions