First crack at exercise 2.6.  Will write tests soon