deleting checkGrad