completing the first sections in Chapter3 and minor fixes in the rest of the sections