Chapter 10 exercise partially done