add Bob Wightman's solution to Exercise 2-8