Implement partly working shared memory

milestone3