change readMatrices