Rebuild
Added hysteresis