finished computation of thresholds