Solved exercise 10