Fixed chap08 code.