you could preallocate before assigning ST to avoid the realloc with concatenate