cubic spline iteration