diff --git a/evrouting/graph_tools.py b/evrouting/graph_tools.py
index 0807efe8b0eb840fb11d860683f8d473739be1ae..46a189312bb59af3bd4ff136d0e9c5f91a51b6e1 100644
--- a/evrouting/graph_tools.py
+++ b/evrouting/graph_tools.py
@@ -92,13 +92,13 @@ class AccessFunctions:
     """
 
     def __init__(self,
-                 distance=distance,
-                 consumption=consumption,
-                 charging_coefficient=charging_cofficient
+                 get_distance=None,
+                 get_consumption=None,
+                 get_charging_coefficient=None
                  ):
-        self._distance = distance
-        self._consumption = consumption
-        self._charging_coefficient = charging_coefficient
+        self._distance = get_distance or distance
+        self._consumption = get_consumption or consumption
+        self._charging_coefficient = get_charging_coefficient or charging_cofficient
 
     def distance(self, G, u, v):
         return self._distance(G, u, v)