modify to update shared-memory example