change to median lag, increased default thresholds, added warning threshold