diff --git a/Trajectories/Tests/segments_cost.graphml b/Trajectories/Tests/segments_cost.graphml
index 228a56d02ee320e2abe17d771ecc86caa8cdc31f..85b6aed8b17a500b8f91850be77d48678835b3ec 100644
--- a/Trajectories/Tests/segments_cost.graphml
+++ b/Trajectories/Tests/segments_cost.graphml
@@ -5,12 +5,14 @@
 
   <!-- property keys -->
   <key id="key0" for="edge" attr.name="cost_function" attr.type="float" />
+  <key id="key1" for="graph" attr.name="e_overestim" attr.type="int" />
   <key id="key3" for="node" attr.name="inst_eddies" attr.type="vector_int" />
   <key id="key6" for="node" attr.name="name" attr.type="string" />
 
   <graph id="G" edgedefault="directed" parse.nodeids="canonical" parse.edgeids="canonical" parse.order="nodesfirst">
 
    <!-- graph properties -->
+   <data key="key1">10</data>
 
    <!-- vertices -->
     <node id="n0">
diff --git a/Trajectories/Tests/tests.json b/Trajectories/Tests/tests.json
index f3c6120e6cad1428952023f8bd7d332faa9ef31e..ddbe3827b27884d314743a1e949ed7be4c34f0ac 100644
--- a/Trajectories/Tests/tests.json
+++ b/Trajectories/Tests/tests.json
@@ -74,16 +74,14 @@
 	"command": [
             "$src_dir/Trajectories/trajectories.py",
             "$tests_old_dir/Cost_functions/segments_cost_functions.graphml"
-	],
-	"input": "10"
+	]
     },
     "Greece_trajectories": {
 	"description": "A larger case than Trajectories.",
 	"command": [
             "$src_dir/Trajectories/trajectories.py",
             "$tests_old_dir/Greece_cost_function/segments_cost_functions.graphml"
-	],
-	"input": "7"
+	]
     },
     "Draw_segments":
     {
@@ -125,8 +123,7 @@
 	    "$src_dir/Trajectories/trajectories.py",
 	    "$src_dir/Trajectories/Tests/segments_cost.graphml"
 	],
-	"description": "A toy case of division followed by fusion.",
-	"input": "10"
+	"description": "A toy case of division followed by fusion."
     },
     "Test_order_edges":
     {
@@ -135,7 +132,6 @@
 	    "$src_dir/Trajectories/trajectories.py",
 	    "$src_dir/Trajectories/Tests/example_2.graphml"
 	],
-	"description": "A toy case to test the algorithm in trajectories.py, specifically to test the order in which edges are processed.",
-	"input": "10"
+	"description": "A toy case to test the algorithm in trajectories.py, specifically to test the order in which edges are processed."
     }
 }
diff --git a/Trajectories/trajectories.py b/Trajectories/trajectories.py
index de74e85680a87b223fbc1edac0bdd2cb247a0899..edd924ee310ed1b04a604a139536b0505894764c 100755
--- a/Trajectories/trajectories.py
+++ b/Trajectories/trajectories.py
@@ -83,8 +83,6 @@ def assign_traj_edge(source, target, traj_prop, ind_traj, g, traj_segm,
 
 if len(sys.argv) != 2: sys.exit("Required argument: input-graph")
 g = graph_tool.load_graph(sys.argv[1])
-e_overestim = input("Enter e_overestim: ")
-e_overestim = int(e_overestim)
 
 traj_prop = g.new_vertex_property('int', val = - 1)
 # Trajectory index to which a segment belongs. - 1 means the segment
@@ -101,7 +99,7 @@ my_subgraphs = {}
 if "cost_function" in g.edge_properties:
     for v in g.vertices():
         date_index = report_graph.node_to_date_eddy(int(g.vp.name[v]),
-                                                    e_overestim,
+                                                    g.gp.e_overestim,
                                                     only_date = True)
 
         if date_index in my_subgraphs: