implement 'on' for optparse