added support for snippets