improved command line option parsing