Complete and tests passingup to end of section 4.1