updated ThresholdCrossingDetector