string concatenation in an O(N) loop makes baby jesus cry