made a few enhancements
added a new example using shared memory