minor tweaks to code snippets