fixed main() so that it won't throw an exception once you run the file.