Solve Exercise 3.23