Fixed chap10 code.