create MainHandler class