removed buffer manager and implemented a construct with reference counts