The other question i meant to ask was on line 18 for example triadd is only being incremented by one is there a technical reason you used += rather than ++