Added calibration code in a separate file