shared memory now works. Still segfaults