calculate diffs between changes