modified MemManager