fixing some of the iterations.  still not looping quite correctly, indexes not incrementing right, but getting closer