changed func spline, now uses scipy new implementation