implemented importMemory in cpu.c