Changes on calibration routine