Added function to apply calibration