working on the email steps and functions