mailing + refactoring