Further caching
string mutations replaced with string.joins