added methods to message_handler.h and .cc