add some examples and fix bug