added code snippets to readme.md