adding a message class to handle message distribution