rewrite send_msg