improved parsing of message 4
improved parsing of message 5