added shared memory functionality