refactoring rank