hw4 part1.8&9