Completed exercise 3.14