added BufferManager class