rename to set_msg and add doc comment.