updated spline.cc to use GSL cubic spline