added the email address check function