source code of chapter 11 and appendix, cheers!