forgot the setDb function. Since I'm looping a little different I can't rely on loop counter