updates to example code