add Andrew Tesker's solution to Exercise 3-1