implementing localStorage for total score