adding spline fitting