Fix test bug and Finished till chapter8 pg.328