fit splines curve