updateScore method added.