some changes in memory manager