Finish ch10 exercise