moved email validation to model