added findThreshold() commands