Partially solved the Exercise 1.5.