Edited the main method