snippets: update code