added naive calibration header detection