Finish Chapter 10 exercise