converted shortest path to flows to be added