begin integration of getopt