Wrote utility function to help keep the score.