use same code as in org. Reactize for applyDiff and use better describing constant name