added validation for email input