refactoring and cleanup message 6