added some methods in message_handler.cc and .h