Separated calibration functions from main