revised code to add first name and e-mail validation