You do not need to add more loop if you already have double loop in your code.

However, you have to do it correctly.
I do not know how you did it and I do not know how can I help?