reworked CLI options parser with getopt_long