first pass at opts parsing