Updated findThreshold