Completed question 2. in Exercise 6