oh man, my code was bad. fixing iteration in for loop.