switch to cmdargs instead of cmdtheline