diff --git a/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp b/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp
index 01a72f4e525feab27f855562f6b280069044b9a6..27db781ee7bb413475692dcd4acf2271d5d9a2ff 100644
--- a/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp
+++ b/src/ShortestPath/Transit/TransitShortestPathPrecompute.cpp
@@ -29,14 +29,14 @@ TransitStateContainer TransitShortestPathPrecompute::executeAlgorithm(const Grap
         //Extract head from our state priority queue
         currentState = statePriorityQueue.top();
         statePriorityQueue.pop();
-        if(!solutionsContainer.getBestSolution(currentState.getNodeIndex()).strictlyDominates(currentState)) {
-            DEBUG_MSG("\n\nComparing state " + currentState.toString() + " and \n" + solutionsContainer.getBestSolution(currentState.getNodeIndex()).toString());
+        if(!solutionsContainer.strictlyDominates(currentState)) {
+            DEBUG_MSG("\n\nComparing state " + currentState.toString() + " and \n" + solutionsContainer.getBestSolution(currentState.getNodeIndex(), currentState.getNbConnections()).toString());
             DEBUG_MSG("State isn't dominated, trying to extend it");
-            for (auto& lineStop : graph.getNode(currentState.getNodeIndex()).getPTLinesSet())
+            for (auto& lineStop : graph.getPTLinesSet(currentState.getNodeIndex()))
             {
                 int nextNode = lineStop.getNextNodeIndex();
                 //If there is a proper next node and if it's not the same as our last used line stop predecessor
-                if(nextNode != -1 && (currentState.getConnections().empty() || nextNode != currentState.getConnections().back().getPrecedingNodeIndex())) {
+                if(nextNode != -1 && (currentState.isEmpty() || nextNode != currentState.getPrecedingNodeIndex())) {
                     TransitAlgorithmState newState; //define variable before conditionals
                     if(currentState.isEmpty() || currentState.getLastConnectionLine() != lineStop.getLineRef()) // if new line is different than current line
                     {
@@ -64,7 +64,7 @@ TransitStateContainer TransitShortestPathPrecompute::executeAlgorithm(const Grap
                     DEBUG_MSG("Created new state " + newState.toString());
 
                     //Add new state to the solution container and the priority queue if it's not strictly dominated by an existing solution
-                    if(!solutionsContainer.getBestSolution(currentState.getNodeIndex()).strictlyDominates(currentState)) {
+                    if(!solutionsContainer.strictlyDominates(currentState)) {
                         DEBUG_MSG("Candidate state " + newState.toString() + " is being added to solution container and priority queue");
                         solutionsContainer.addNewState(nextNode, newState);
                         statePriorityQueue.emplace(newState);
diff --git a/src/ShortestPath/Transit/TransitStateContainer.h b/src/ShortestPath/Transit/TransitStateContainer.h
index a1ed77fa62a8dc45fc9efd4cb7d6c4d01efbd61c..6adf18bcbc1c98f79ef31a818fcd2ba514abc62d 100644
--- a/src/ShortestPath/Transit/TransitStateContainer.h
+++ b/src/ShortestPath/Transit/TransitStateContainer.h
@@ -43,10 +43,16 @@ public:
      * @param nodeIndex
      * @return The first solution of potentially two saved in this array
      */
-    TransitAlgorithmState& getBestSolution(int nodeIndex){ return solutionVector.at(nodeIndex)[0];}
+    std::vector<TransitAlgorithmState>& getBestSolutions(int nodeIndex){ return solutionVector.at(nodeIndex);}
+    TransitAlgorithmState& getBestSolution(int nodeIndex, int nbConnections){ return solutionVector.at(nodeIndex)[nbConnections];}
     std::vector<TransitAlgorithmState>& getSolutions(int nodeIndex){ return solutionVector.at(nodeIndex);}
     std::vector<std::vector<TransitAlgorithmState>>& getSolutionsVector(){ return solutionVector;}
 
+    bool strictlyDominates(const TransitAlgorithmState& state){
+        return getBestSolution(state.getNodeIndex(), state.getNbConnections()).strictlyDominates(state);
+    }
+
+
     /**
      * Resizes solution vector and initializes state vectors to be able to add our solutions during algorithm execution
      * @param nbNodes How many nodes there are in the full graph
diff --git a/src/instance/graph/Graph.h b/src/instance/graph/Graph.h
index 0f95d0b0fd643d3ef87e22b0bb91e6918add3065..c1b329d76bfbad1cee9df9681c6b96136a02054b 100644
--- a/src/instance/graph/Graph.h
+++ b/src/instance/graph/Graph.h
@@ -42,6 +42,10 @@ public:
         return nodesVector.at(nodeIndex);
     }
 
+    [[nodiscard]] std::vector<LineStop> getPTLinesSet(int nodeIndex) const {
+        return nodesVector.at(nodeIndex).getPTLinesSet();
+    }
+
     /**
      * @return The graph's edge vector
      */
diff --git a/src/instance/graph/LineStop.h b/src/instance/graph/LineStop.h
index 5a1e195eea4e409b7a9ab87715045ccb3135de0b..e4883c2bb8b262dcf5cc4d92ee5e008c1526a2c0 100644
--- a/src/instance/graph/LineStop.h
+++ b/src/instance/graph/LineStop.h
@@ -22,9 +22,7 @@ public:
         return _lineRef;
     }
 
-    void setLineRef(Line &lineRef) {
-        _lineRef = lineRef;
-    }
+    [[nodiscard]] int getInstant(int stationIdx, int scheduleIdx) const { return _lineRef.getInstant(stationIdx, scheduleIdx); }
 
     /**
      * @return -1 if there are no valid successors to this LineStop's node. Returns the node index in the graph if there is a valid successor