updated 2 snippets