Chris #9 - Adds function for extracting messages