calculated the problems at the end of chapter 2