spline needs to be optimized