implemented Memory.