A few of the code examples from chapters 2 and 16