added some commandline argument parsing