added commandline argument handling