Completes exercise 10