complete Chapter 5 exercise