refine snippets