Made argv a parameter for main function