chap2 and chap3; started chap4