added is_valid_email function