use gradient hysteresis