rename col to col_mat and row to row_mat