Exercise 2.1 from the book