My work for chapter 13 of the book