implement MVP for the matrix