update THRESHOLD