Completed exercise 4.2.1.