maybe full implementation of BufferManager