Changed the main method