add exercises 4 and 5 from end of chapter 3