Completed exercise 22c