Excercises 9 and 10 completed with middleman