Refactoring
implement score method