score refactoring