-- Added the logic for computing the scores