spline implementation pt 1