it is correct to have the display method of the matrix in the algorithm code?