             NSException(name: "Column index out of bound", reason: "The column index range is out of bounds. Range \(columnRange) given, but matrix column range is \(0..<self.dimensions.columns) .", userInfo: nil).raise()
         }
         
-        var matrixElements = [[T]]()
+        var elementsList = [T]()
         
         for row in rowRange {
-            
-            var rowElements = [T]()
-            
             for column in columnRange {
                 
-                rowElements.append(self[row][column])
-            }
-            
-            matrixElements.append(rowElements)
-        }
-        
-        return Matrix(matrixElements)
+                elementsList.append(self.element(row, column))
+            }
+        }
+        
+        return Matrix(elementsList: elementsList, rows: rowRange.endIndex - rowRange.startIndex)
     }
     
     

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

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