messaging refactored