rating refactoring