new diff algorithm, all tests pass