added snippets to docs