completed Chapter 6

Nice - deterministic output