Added a main method to handler