fixes to code snippets