using cubic spline