add getopt to resolve the command line parameter