Chapter 8: patterns