Put the section generation into a loop