using the hysteresis parameter as upper threshold