First pass on problem #8. Solution is embarassing.