Refactoring add score function.