added total score functionality