Exercise 2.7 done