2nd iteration in 2 dimensions using for loops