make rule removal iterative instead of recursive