same thing as above here and for setThresholds