use getopt to parse the options