chap 3 finished. fixed #62 and fixed #64