broke messagehandler into separate class