trying to find if using iteration is the problem