does this need to be defined everytime in this loop or can it be defined outside the loop