validation function changes