implemented memory manager