fitSpline function

Fit splines to data