Cool, I ran your code with the line uncommented out that displayed what numdims was grabbing and it says the same thing as mine, so it shows that I can't use numdims as an index number when cycling through all the dimensions, your way is better for that, but it shows that I'm on the right track...