part2 first attempt with shared mem