works up to section 4