Code from the tutorial on page 84.
