Switched to multi-dimensional arrays