add support for getopt