Changed the rowset structure to matrix structure