refactor message view