Using lists instead of string concatenation