sorting the fitting values