changed mapSnippet to map, as it can map templates and snippets