chapter2 and part1 of chapter3