refactoring rating directive