optimize for buffers.