commit chap8 and chap9 exercises