added email processing