minor bugfix
refactored command line parsing