parses command line arguments