changed the main method to be correct