add getopt, don't overflow with command line arguments, use strcasecmp