remove unnecessary helper from Exercise 3.24 solution