Completing exercise 9