refactoring of BufferBuilders