Change default threshold, add hysteresis