Exercise 12

Plus part of 9