after more testing, i found that the loops aren't going over the entire document.  also certain elements are being repeated.  have to look at my logic again :(
 something silly is going on with looping through these arrays