Exercise 3.28, naive version