add accessor to number of rows and columns in matrix