update to memory management