refactor Messages