update source code snippets