revised the matrix's dimension and data