calibration code injected (need process mode state to be added too)