refactored messaging