moved snippets to separate file