refactor rule