handles commandline arguments