some snippets improvements