Completed exercise 4.3.