added curvature gathering