- refactoring of email service