diff --git a/lib/algo/algo.ml b/lib/algo/algo.ml
index 7a4b780dc06c335c4b5330d13a1283076f182b1b..ada7ea2030e86fbfc96a58e77d80d25d346b14bc 100644
--- a/lib/algo/algo.ml
+++ b/lib/algo/algo.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 07/07/2020 (at 16:11) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 15:49) by Erwan Jahier> *)
 
 open Sasacore
 (* Process programmer API *)
@@ -45,7 +45,7 @@ type 's state_init_fun = int -> string -> 's
 type 's fault_fun = int -> string -> 's -> 's
 type 's legitimate_fun = pid list -> (pid -> 's * 's neighbor list) -> bool
 
-type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action }
+type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action option }
 type 's potential_fun = pid list -> (pid -> 's pf_info) -> float
 
 type 's algo_to_register = {
diff --git a/lib/algo/algo.mli b/lib/algo/algo.mli
index aea01bbebb381b00c99341fd61bf20db2e09471c..1f20009f846c4a62ca37040b0ef8bf988f0c2222 100644
--- a/lib/algo/algo.mli
+++ b/lib/algo/algo.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 08/07/2020 (at 15:12) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:01) by Erwan Jahier> *)
 (** {1 The Algorithm programming Interface.} *)
 (** 
     {1 What's need to be provided by users.}
@@ -84,9 +84,14 @@ val get_graph_attribute : string -> string
 Useful to explore best/worst case daemons
  *)
 type pid = string
-type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action }
+type 's pf_info = {
+    neighbors: 's neighbor list;
+    curr: 's ; (* the current state *)
+    next: 's; (* the state we want to compute the potential of *)
+    action: action option (* None if the pid has not been activated *)
+  }
 type 's potential_fun = pid list -> (pid -> 's pf_info) -> float
-(** *)
+(** The first input is the  *)
 
                       
 (** {1 Legitimate Configurations}  *)
diff --git a/lib/sasa/sasaRun.ml b/lib/sasa/sasaRun.ml
index a759b697ea911584bb8e591eb4ceca3eaab039bc..f9bcecd99cfcbab26bf2b56032385b9b54def0d9 100644
--- a/lib/sasa/sasaRun.ml
+++ b/lib/sasa/sasaRun.ml
@@ -41,8 +41,8 @@ let (get_sl_out: bool -> 'v Process.t list -> bool list list -> RdbgPlugin.sl) =
 
 let (make_do: string array -> SasArg.t ->
      ('v Process.t * 'v Register.neighbor list) list -> 'v Env.t -> RdbgPlugin.t) =
-  fun argv args pl_n e -> 
-    let pl = fst (List.split pl_n) in
+  fun argv args p_nl_l e -> 
+    let pl = fst (List.split p_nl_l) in
     let prog_id = Printf.sprintf "%s (with sasa Version %s)"
         (String.concat " " (Array.to_list argv)) SasaVersion.str
     in
@@ -67,21 +67,21 @@ let (make_do: string array -> SasArg.t ->
         match !pre_enable_processes_opt with
         | None  -> (* the first step *)
           (* 1: Get enable processes *)
-          let pnall, enab_ll = Sasacore.Main.get_enable_processes pl_n e in
-          let sasa_nenv = from_sasa_env pl_n e in 
+          let pnall, enab_ll = Sasacore.Main.get_enable_processes p_nl_l e in
+          let sasa_nenv = from_sasa_env p_nl_l e in 
           pre_enable_processes_opt := Some(pnall, enab_ll);
           sasa_nenv @ (get_sl_out true pl enab_ll) 
         | Some (pre_pnall, pre_enab_ll) ->
           (* 2: read the actions from the outside process, i.e., from sl_in *)
           let _, pnal = Daemon.f args.dummy_input
-              (args.verbose > 1) args.daemon pl e pre_pnall pre_enab_ll
+              (args.verbose > 1) args.daemon p_nl_l e pre_pnall pre_enab_ll
               (get_action_value sl_in)
           in
           (* 3: Do the steps *)
           let ne = Sasacore.Step.f pnal e in
-          let sasa_nenv = from_sasa_env pl_n ne in
+          let sasa_nenv = from_sasa_env p_nl_l ne in
           (* 1': Get enable processes *)
-          let pnall, enab_ll = Sasacore.Main.get_enable_processes pl_n ne in
+          let pnall, enab_ll = Sasacore.Main.get_enable_processes p_nl_l ne in
           pre_enable_processes_opt := Some(pnall, enab_ll);
           sasa_env := ne;
           sasa_nenv @ (get_sl_out true pl enab_ll) 
@@ -91,16 +91,16 @@ let (make_do: string array -> SasArg.t ->
         (* in this mode, sasa does not play first *)
         let e = !sasa_env in
         (* 1: Get enable processes *)
-        let pnall, enab_ll = Sasacore.Main.get_enable_processes pl_n e in
+        let pnall, enab_ll = Sasacore.Main.get_enable_processes p_nl_l e in
         (* 2: read the actions from the outside process, i.e., from sl_in *)
         let activate_val, pnal = Daemon.f args.dummy_input
-            (args.verbose > 1) args.daemon pl e pnall enab_ll
+            (args.verbose > 1) args.daemon p_nl_l e pnall enab_ll
             (get_action_value sl_in)
         in
         (* 3: Do the steps *)
         let ne = Sasacore.Step.f pnal e in
         sasa_env := ne;
-        (from_sasa_env pl_n e) @ (get_sl_out true pl enab_ll) @
+        (from_sasa_env p_nl_l e) @ (get_sl_out true pl enab_ll) @
         (get_sl_out false pl activate_val) 
     in
     let step = if args.daemon = Daemon.Custom then step else step_internal_daemon in
@@ -155,8 +155,8 @@ let (make_do: string array -> SasArg.t ->
 let (make: string array -> RdbgPlugin.t) =
   fun argv ->
     try
-      let args, pl_n, e = Sasacore.Main.make false argv in
-      make_do argv args pl_n e
+      let args, p_nl_l, e = Sasacore.Main.make false argv in
+      make_do argv args p_nl_l e
     with
     | Dynlink.Error e ->
       Printf.printf "Error (SasaRun.make): %s\n" (Dynlink.error_message e);
diff --git a/lib/sasacore/daemon.ml b/lib/sasacore/daemon.ml
index e0e519f89ecdee1d8153874c4b483d991bd14e7a..4cc5c7da16ddd2c392586d1aa24bdc00b5240d61 100644
--- a/lib/sasacore/daemon.ml
+++ b/lib/sasacore/daemon.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 01/07/2020 (at 11:14) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:06) by Erwan Jahier> *)
 
 type t =
   | Synchronous (* select all actions *) 
@@ -119,9 +119,11 @@ let (get_activate_val: 'v pna list -> 'v Process.t list -> bool list list)=
     let al = List.map (fun (p,_,a) -> p,a) al in
     List.map  (List.map (fun a -> List.mem a al)) actions 
 
-let (f: bool -> bool -> t -> 'v Process.t list -> 'v Env.t -> 'v pna list list -> bool list list ->
+let (f: bool -> bool -> t -> ('v Process.t * 'v Register.neighbor list) list -> 'v Env.t ->
+     'v pna list list -> bool list list ->
      (string -> string -> bool) -> bool list list * 'v pna list) =
-  fun dummy_input verbose_mode daemon pl e all enab get_action_value ->
+  fun dummy_input verbose_mode daemon p_nl_l e all enab get_action_value ->
+  let pl = fst(List.split p_nl_l) in
     if daemon <> Custom && dummy_input then
       ignore (RifRead.bool verbose_mode ((List.hd pl).pid) "");
     match daemon with
@@ -138,7 +140,7 @@ let (f: bool -> bool -> t -> 'v Process.t list -> 'v Env.t -> 'v pna list list -
       let al = distributed (remove_empty_list all) in
       get_activate_val al pl, al
     | Worst ->
-       let al = Evil.worst e (remove_empty_list all) in
+       let al = Evil.worst e p_nl_l (remove_empty_list all) in
        get_activate_val al pl, al
     | Bad i ->
        let al = Evil.bad i e (remove_empty_list all)  in
diff --git a/lib/sasacore/daemon.mli b/lib/sasacore/daemon.mli
index 68597431e6a08d3284662c8cb50f1a7c4d91cd42..25fdd6c7a86e11902fadd08569a179562fadfb93 100644
--- a/lib/sasacore/daemon.mli
+++ b/lib/sasacore/daemon.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 29/06/2020 (at 10:51) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:14) by Erwan Jahier> *)
 
 type t =
   | Synchronous (* select all actions *) 
@@ -17,13 +17,13 @@ type t =
 
 type 'v pna = 'v Process.t * 'v Register.neighbor list * Register.action
 
-(** f dummy_input_flag verbose_mode daemon pl actions_ll enab
+(** f dummy_input_flag verbose_mode daemon p_nl_l actions_ll enab
 
 inputs:
 - dummy_input_flag: true when used with --ignore-first-inputs 
 - verbose_mode: true when the verbose level is > 0
 - daemon: 
-- pl: list of all processes
+- p_nl_l: list of all processes, and their neighbors
 - actions_ll: list of list of existing actions 
 - enab: list of list saying which actions are enabled
 
@@ -43,6 +43,7 @@ nb: it is possible that we read on stdin that an action should be
    inhibit the activation.
 *)
 
-val f : bool -> bool -> t -> 'v Process.t list -> 'v Env.t -> 'v pna list list -> bool list list ->
-  (string -> string -> bool) -> bool list list * 'v pna list
+val f : bool -> bool -> t -> ('v Process.t * 'v Register.neighbor list) list ->
+        'v Env.t -> 'v pna list list -> bool list list ->
+        (string -> string -> bool) -> bool list list * 'v pna list
 
diff --git a/lib/sasacore/evil.ml b/lib/sasacore/evil.ml
index d15ef59c9aaeed69122d3f335387f91caf420339..f297f76710b7550aa11c723d2c29dc44f78866b1 100644
--- a/lib/sasacore/evil.ml
+++ b/lib/sasacore/evil.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 06/07/2020 (at 16:55) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:16) by Erwan Jahier> *)
 
 
 
@@ -101,22 +101,22 @@ let _time3 lbl f x y z =
   Printf.printf " --> [%s] Execution time: %fs\n" lbl (Sys.time() -. t);
   fxy 
 
-let (worst: 'v Env.t -> 'v pna list list -> 'v pna list) =
-  fun e all ->
+let (worst: 'v Env.t -> ('v Process.t * 'v Register.neighbor list) list ->
+     'v pna list list -> 'v pna list) =
+  fun e p_nl_l all ->
   match Register.get_potential () with
   | None -> failwith "No potential function has been provided"
   | Some user_pf ->
      let pf pnal = (* pnal contains a list of activated processes *)
-       let pidl =  List.map (fun (p,_,_) -> p.Process.pid) pnal in
-       let p_nl_l =  List.map (fun (p,nl,_) -> p.Process.pid, nl) pnal in
+       let pidl = List.map (fun (p,_) -> p.Process.pid) p_nl_l in
        let p_a_l =  List.map (fun (p,_,a) -> p.Process.pid, a) pnal in
        let ne = Step.f pnal e in
        let get_info pid =
          {
-           Register.neighbors = List.assoc pid p_nl_l;
+           Register.neighbors = snd (List.find (fun (p,_) -> p.Process.pid = pid) p_nl_l);
            Register.curr = Env.get e pid ;
            Register.next = Env.get ne pid ;
-           Register.action = List.assoc pid p_a_l
+           Register.action = List.assoc_opt pid p_a_l
          }
        in
        user_pf pidl get_info
diff --git a/lib/sasacore/evil.mli b/lib/sasacore/evil.mli
index 2d9a1953c272d7779f99ec3b3e3bd8526b4e4cbb..6e9484208d8456cfed3874a85fc969b75e89a65b 100644
--- a/lib/sasacore/evil.mli
+++ b/lib/sasacore/evil.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 01/07/2020 (at 14:44) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:12) by Erwan Jahier> *)
 
 
 (** This module gathers daemons that tries to reach the worst case with
@@ -8,7 +8,8 @@ type 'v pna = 'v Process.t * 'v Register.neighbor list * Register.action
 
 (** Enumerate  all the combinations (O(2^n)  where n is the  number of
    enabled processes) *)
-val worst: 'v Env.t -> 'v pna list list -> 'v pna list
+val worst: 'v Env.t -> ('v Process.t * 'v Register.neighbor list) list ->
+           'v pna list list -> 'v pna list
 
 (** Returns  the worst  solution for  convex potential  functions, and
    just a  bad one otherwise  (O(n) where n  is the number  of enabled
diff --git a/lib/sasacore/register.ml b/lib/sasacore/register.ml
index 8e5725bbc9d8778cf1d3b10a1f3f417db93190c9..b7711334a76995bb1398cf90e34826d34ee2fe5b 100644
--- a/lib/sasacore/register.ml
+++ b/lib/sasacore/register.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 07/07/2020 (at 14:46) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:13) by Erwan Jahier> *)
 
 type 's neighbor = {
   state:  's ;
@@ -14,7 +14,7 @@ type 's enable_fun = 's neighbor list -> 's -> action list
 type 's step_fun   = 's neighbor list -> 's -> action -> 's
 
 type pid = string
-type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action }
+type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action option }
 type 's potential_fun = pid list -> (pid -> 's pf_info) -> float
 type 's fault_fun = int -> string -> 's -> 's
 type 's legitimate_fun = string list -> (string -> 's * 's neighbor list) -> bool
diff --git a/lib/sasacore/register.mli b/lib/sasacore/register.mli
index 348656265926d5edd037692cbaa23611b886e939..4f61112f6a01d8056207504721d5862724751ce2 100644
--- a/lib/sasacore/register.mli
+++ b/lib/sasacore/register.mli
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 07/07/2020 (at 14:47) by Erwan Jahier> *)
+(* Time-stamp: <modified the 08/07/2020 (at 16:13) by Erwan Jahier> *)
 
 (**  This module  duplicates and  extends the  Algo module  with get_*
    functions.
@@ -23,7 +23,7 @@ type 's step_fun   = 's neighbor list -> 's -> action -> 's
 type 's fault_fun = int -> string -> 's -> 's
 
 type pid = string
-type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action }
+type 's pf_info = { neighbors: 's neighbor list; curr: 's ; next: 's; action: action option }
 type 's potential_fun = pid list -> (pid -> 's pf_info) -> float
 type 's legitimate_fun = string list -> (string -> 's * 's neighbor list) -> bool
 
diff --git a/src/sasaMain.ml b/src/sasaMain.ml
index e7e4ef9f6e34d184c3c2f24bc705078969521b5d..7f0eb11e601fee1764e7fdada3f8d531f864331c 100644
--- a/src/sasaMain.ml
+++ b/src/sasaMain.ml
@@ -73,10 +73,10 @@ let inject_fault ff p_nl e =
      
 let (simustep: int -> int -> SasArg.t -> string -> 
      ('v Process.t * 'v Register.neighbor list) list -> 'v Env.t -> 'v Env.t * string) =
-  fun n i args activate_val p_nl e ->
+  fun n i args activate_val p_nl_l e ->
   (* 1: Get enable processes *)
-  let all, enab_ll = Sasacore.Main.get_enable_processes p_nl e in
-  let pl = fst(List.split p_nl) in
+  let all, enab_ll = Sasacore.Main.get_enable_processes p_nl_l e in
+  let pl = fst(List.split p_nl_l) in
   List.iter (List.iter (fun b -> if b then incr moves)) enab_ll;
 
   let e = 
@@ -94,8 +94,8 @@ let (simustep: int -> int -> SasArg.t -> string ->
          Printf.eprintf "\n%sThis algo is silent after %i moves, %i steps, %i rounds.\n"
            str !moves i !rounds;
          Printf.eprintf "==> Inject a fault\n%!";
-         inject_fault ff p_nl e
-    ) else if legitimate p_nl e then (
+         inject_fault ff p_nl_l e
+    ) else if legitimate p_nl_l e then (
       match Register.get_fault () with
       | None ->
          print_step n i args e pl activate_val enab_ll;
@@ -107,7 +107,7 @@ let (simustep: int -> int -> SasArg.t -> string ->
            "\n%sThis algo Reached a legitimate configuration after %i moves, %i steps, %i rounds.\n"
            str !moves i !rounds;
          Printf.eprintf "==> Inject a fault\n%!";
-         inject_fault ff p_nl e
+         inject_fault ff p_nl_l e
     )
     else
       e
@@ -117,7 +117,7 @@ let (simustep: int -> int -> SasArg.t -> string ->
   (* 2: read the actions *)
   let get_action_value = RifRead.bool (args.verbose > 1) in
   let next_activate_val, pnal = Daemon.f args.dummy_input
-                                  (args.verbose > 1) args.daemon pl e all enab_ll get_action_value 
+                                  (args.verbose > 1) args.daemon p_nl_l e all enab_ll get_action_value 
   in
   update_round next_activate_val enab_ll;
   let next_activate_val =
@@ -135,17 +135,17 @@ let (simustep: int -> int -> SasArg.t -> string ->
 
 let rec (simuloop: int -> int -> SasArg.t -> string -> 
          ('v Process.t * 'v Register.neighbor list) list -> 'v Env.t -> unit) =
-  fun n i args activate_val p_nl e ->
-  let ne, next_activate_val = simustep n i args activate_val p_nl e in
-  if i > 0 then simuloop n (i-1) args next_activate_val p_nl ne else (
+  fun n i args activate_val p_nl_l e ->
+  let ne, next_activate_val = simustep n i args activate_val p_nl_l e in
+  if i > 0 then simuloop n (i-1) args next_activate_val p_nl_l ne else (
     print_string "#q\n"; flush stdout
   )
 
 let () =
-  let args, p_nl, e = Sasacore.Main.make true Sys.argv in
+  let args, p_nl_l, e = Sasacore.Main.make true Sys.argv in
   try
     let n = args.length in
-    simuloop n n args "" p_nl e
+    simuloop n n args "" p_nl_l e
   with
   | Failure msg -> Printf.eprintf " [sasa] Error: %s\n%!" msg
   | Silent i ->