Working with multi-dimensional arrays