Finish chapter 1 exercise