add some examples and some code fixes