Tested with different for loops for verification of totals.