add Paul Griffiths's solution to Exercise 3-4