tweak code snippets