fixing up main method