main function with argv