Calibration function updated