replaced getopt with getopt_long for --long arguments