Added basic calibration logic