better usage of ByteBuffer/BufferStacker