use getopt.h to parse command line options