#9 - added addtional message headers including determining the message type