Added total score logic