Why are you using (pos - i) instead of just i??
You are not removing any row or anything, you should be able to travel through the table in any order.