chapter 6 exercises: methods