     /// - returns: An array of Edges containing the entire route, or an empty array if no route could be found
     public func dfs(from: V, goalTest: (V) -> Bool) -> [E] {
         if let u = indexOfVertex(from) {
-            return dfs(from: u, goalTest: goalTest)
+            return dfs(fromIndex: u, goalTest: goalTest)
         }
         return []
     }
     
     /// Find a route from one vertex to another using a depth-first search.
     ///
-    /// - parameter from: The index of the starting vertex.
-    /// - parameter to: The index of the ending vertex.
-    /// - returns: An array of Edges containing the entire route, or an empty array if no route could be found
-    public func dfs(from: Int, to: Int) -> [E] {
+    /// - parameter fromIndex: The index of the starting vertex.
+    /// - parameter toIndex: The index of the ending vertex.
+    /// - returns: An array of Edges containing the entire route, or an empty array if no route could be found
+    public func dfs(fromIndex: Int, toIndex: Int) -> [E] {
         // pretty standard dfs that doesn't visit anywhere twice; pathDict tracks route
         var visited: [Bool] = [Bool](repeating: false, count: vertexCount)
         let stack: Stack<Int> = Stack<Int>()
         var pathDict: [Int: Edge] = [Int: Edge]()
-        stack.push(from)
+        stack.push(fromIndex)
         while !stack.isEmpty {
             let v: Int = stack.pop()
-            if v == to {
-                // figure out route of edges based on pathDict
-                return pathDictToPath(from: from, to: to, pathDict: pathDict) as! [Self.E]
+            if v == toIndex {
+                // figure out route of edges based on pathDict
+                return pathDictToPath(from: fromIndex, to: toIndex, pathDict: pathDict) as! [Self.E]
             }
             visited[v] = true
             for e in edgesForIndex(v) {

    /// - returns: An array of arrays of Edges containing routes to every vertex connected and passing goalTest(), or an empty array if no routes could be founding the entire route, or an empty array if no route could be found
    public func findAll(from: V, goalTest: (V) -> Bool) -> [[E]] {
        if let u = indexOfVertex(from) {
            return findAll(from: u, goalTest: goalTest)
        }
        return []
    }

    /// Find path routes from a vertex to all others the
    /// function goalTest() returns true for using a breadth-first search.
    ///
    /// - parameter fromIndex: The index of the starting vertex.
    /// - parameter goalTest: Returns true if a given vertex is a goal.
    /// - returns: An array of arrays of Edges containing routes to every vertex connected and passing goalTest(), or an empty array if no routes could be found
    public func findAll(fromIndex: Int, goalTest: (V) -> Bool) -> [[E]] {
        // pretty standard bfs that doesn't visit anywhere twice; pathDict tracks route
        var visited: [Bool] = [Bool](repeating: false, count: vertexCount)
        let queue: Queue<Int> = Queue<Int>()
        var pathDict: [Int: Edge] = [Int: Edge]()
        var paths: [[Edge]] = [[Edge]]()
        queue.push(fromIndex)
        while !queue.isEmpty {
            let v: Int = queue.pop()
            if goalTest(vertexAtIndex(v)) {
                // figure out route of edges based on pathDict
                paths.append(pathDictToPath(from: fromIndex, to: v, pathDict: pathDict))
            }
            
            for e in edgesForIndex(v) {
