replace stringbuffer with stringbuilder