replace clear with new StringBuffer()