Changed main to take arguments