Worked on emailUpdates function