converting collection view examples from chapter 8