changed email validation to use regular expression