improving the email engine