add function:memory! and memory, relation class