Revised fitting functions