Added final calibration code