adding control of degree of fitting for the spline (=calfitting_order parameter)