COMPLETE. fixed quadratic spline bug