removed extra $email_safe variable