Fixed the main method