Adapitng to use MessageHandler