msg_handler modified