finalized examples (also some bugfixes