add function and snippets.