Add a crud diff weighting function