added documentation to reveal the magic behind the examples.