fixed calibration routine