Completing exercise 10