Working on the memory functions