Exercise 8 initial solution