looping through the attributes and printing out the page