Getting main to work