unified commandline handling