refactoring message