dealing with thresholds