Add some parts of chapter 4