Update snippets according to new api