refactor removeRule: