refactoring. message fixes