improved command line arg handling