updated for chapters 7 and 8