invert-fun match cases
invert-fun done
wip, cleanup