improved command argument parsing