Chapter 2, and error fix for 4