add multiple thresholds support