added average curvature