trying to match with as few diffs as possible