extract the messages