Add `diff` function