         }
         
         for row in rowRange {
-            
             for column in columnRange {
                 
-                self.elements[row][column] = matrix[row - rowRange.startIndex][column - columnRange.startIndex]
+                self.setElement(atRow: row, atColumn: column, toElement: matrix.element(row - rowRange.startIndex, column - columnRange.startIndex))
             }
         }
     }

        
        for i in 0 ..< self.dimensions.rows {
            
            self.elements[i][index] = newColumn[i]
        }
    }
    

            NSException(name: "New row wrong length", reason: "The new row's length is not equal to the matrix's number of columns.", userInfo: nil).raise()
        }
        
        self.elementsList.replaceRange(index * self.dimensions.columns ..< (index + 1) * self.dimensions.columns, with: newRow.elements)
    }
    
    
