check this tutorial out and you may see what your doing wrong.

for each loops