make snippets model function