added message handler class using dictionary