     /// - returns: An array of Edges containing the entire route, or an empty array if no route could be found
     public func bfs(from: V, goalTest: (V) -> Bool) -> [E] {
         if let u = indexOfVertex(from) {
-            return bfs(from: u, goalTest: goalTest)
+            return bfs(fromIndex: u, goalTest: goalTest)
         }
         return []
     }
     
     /// Find a route from one vertex to another using a breadth-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 bfs(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 bfs(fromIndex: Int, toIndex: Int) -> [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]()
-        queue.push(from)
+        queue.push(fromIndex)
         while !queue.isEmpty {
             let v: Int = queue.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]
             }
             
             for e in edgesForIndex(v) {

    public func dfs(from: V, to: V) -> [E] {
        if let u = indexOfVertex(from) {
            if let v = indexOfVertex(to) {
                return dfs(from: u, to: v)
            }
        }
        return []

    public func bfs(from: V, to: V) -> [E] {
        if let u = indexOfVertex(from) {
            if let v = indexOfVertex(to) {
                return bfs(fromIndex: u, toIndex: v)
            }
        }
        return []
