add examples, some fixes. need tests