added examples from oreilly book