refined command line parsing