changed Stringbuffer to StringBuilder