removed TensorDerivativeNearDeg and ComputeGainNearDeg