cubic spline functions done