more rule refactoring