add some comment and fix example