on_msg_rec: implemented