refactoring message companions logic