use String instead of Chars for string buffers.