translating last example in chapter 8, but it seems incredibly slow