improvements to argument parsing