simplified the validation function