update email functionality