chapters 8 and 9 exercises, 9 not yet done