example of calibration code