ch4 without exercises and minor modifications done