added new function for email validation