small debug stuff in hysteresis
new rewrite system for rings