code snippets fix