added the missing part at the end of chapter 3