updated stringbuilder to be it's own function