Alter code to remove email to separate code