Adding finished problem 12 solution