continuity and convexity fix. curvature to be handled next