converting messages to maps for xmit