Use two variables and `ipairs` on all for loops.