Wrote snippets fn.