update Memory class