gap detection thresholds