moved calibration detection code to own method