fixed examples as per issue #3
more fixes