Finishes exercise 6