changed string concatenating to use stringbuilder