Code written but not tested up to section 4