finished ex6 part 2