add code snippets to README.md