added getOpts