added email code