Solved Exercise 7