reorder adn remove optind