changed spline method