clean up example graph creation and add graph cloning