Updating the example and documentation code