ah, I see you've moved total outside of the loop. Makes sense.