improved the new BufferManager