Solved the exercise 1.8.