adds a snippet