create non-working function in 2D array iteration