Added chapter 4: collect method