if loop, array and total score.