use getopt_long() to accept some options