i think this works
need to fix optparse error