simplified code in StringBuilder