better handling of command line arguments