fixed code snippets.