copy over optsparser boilerplate