matrixArray version 2, updated