for loop dtd finish