in the middle of writning print_msg, consider putting it in the message struct