Re-did the main method.