small changes to example code