refactored to single message type