Finishes exercise 8