added function snippets to readme