fix some bugs, add some snippets~