another stab at exercise 10