Exercise 6.1 uses pointer version