finish exercise18
finish exercise17 for chapter8