use getopt() to parse command line arguments