Changes in calibrate function