chapter6 and chapter7 finished