broke frame out to its own file and made totalScore local to the function score