process command line arguments