add code snippets to README