added gradient calculation on face
removed old gradient calculation function