Code from the tutorial on page 102.
