changed the save_message function signature to accept Message struct