adding in email functionality