modified some snippets