inserting snippets to template