Added while loop to read through section markers