add chapter 3's source code