Score method refactored
Refactored code