reconstruction of the matrix