more tweaks to example code