Adding in code to read in message data