parse commandline flags