fix up code snippets