refactoring module email