add memory primitives