changed Memory.cpp