modification in ndelta counting