add memory to instance of NN