added code for email address validation