anchor.diff:      print_prbr_data(),
   
       %% Write A: phase 1 reaches all replicas, write msg only replica 4
  -    get_notified_by_message(self(), 1, kv_db, 4, dht_node, write),
  -    [get_notified_by_message(self(), 1, kv_db, I, dht_node, round_request) || I <- lists:seq(1,4)],
  -    _SlowLinksA = [slow_link(1, kv_db, I, dht_node, write) || I <- lists:seq(1, 3)],
  +    get_notified_by_message(1, 4, write),
  +    get_notified_by_message(1, [1,2,3,4], round_request),
  +    _ = slow_link(1, [1,2,3], write),
       spawn(fun() -> _ = write_via_node(1, Key, filter_list_append(), "WriteA") end),
  -    [receive {message_received} -> ok end || _ <- lists:seq(1,5)],
  +    wait_until_notification(5),
   
       print_prbr_data(),
       ct:pal("write A done"),
   
       %% Write B: writes replica 1 to 3. gets deny from replica 4 before quorum of acks
       %% --> it retries its request
  -    [get_notified_by_message(self(), 2, kv_db, I, dht_node, round_request) || I <- lists:seq(1,4)],
  -    [get_notified_by_message(self(), 2, kv_db, I, dht_node, read) || I <- lists:seq(1,4)],
  -    [get_notified_by_message(self(), 2, kv_db, I, dht_node, write) || I <- lists:seq(1,4)],
  -
  -    SlowLinksB1 = slow_link(2, kv_db, 4, dht_node, round_request),
  -    SlowLinksB3 = slow_link(2, kv_db, 3, dht_node, write),
  -    SlowLinksB4 = slow_link(2, kv_db, 2, dht_node, read),
  +    get_notified_by_message(2, [1,2,3,4], round_request),
  +    get_notified_by_message(2, [1,2,3,4], read),
  +    get_notified_by_message(2, [1,2,3,4], write),
  +
  +    SlowLinksB1 = slow_link(2, 4, round_request),
  +    SlowLinksB3 = slow_link(2, 3, write),
  +    SlowLinksB4 = slow_link(2, 2, read),
       spawn(fun() -> _ =
               write_via_node(2, Key, filter_list_append(), "WriteB"),
               TestPid ! {write_b_done}
             end),
  -    [receive {message_received} -> ok end || _ <- lists:seq(1,5)],
  +    wait_until_notification(5),
       print_prbr_data(),
   
       ct:pal("flush slow link 4"),
       flush_slow_link(SlowLinksB1),
  -    [receive {message_received} -> ok end || _ <- lists:seq(1,3)],
  +    wait_until_notification(3),
       print_prbr_data(),
   
       ct:pal("flush slow link 3"),
       flush_slow_link(SlowLinksB3),
  -    [receive {message_received} -> ok end || _ <- lists:seq(1,2)],
  +    wait_until_notification(2),
       print_prbr_data(),
   
       %% Write C: observer consistent quorum from repliica 1 to 3
       %% write any follow-up value to all replicas
  -    [get_notified_by_message(self(), 3, kv_db, I, dht_node, write) || I <- lists:seq(1,4)],
  -    SlowLinkC = slow_link(3, kv_db, 4, dht_node, round_request),
  +    get_notified_by_message(3, [1,2,3,4], write),
  +    SlowLinkC = slow_link(3, 4, round_request),
       _ = write_via_node(3, Key, filter_list_append(), "WriteC"),
       remove_slow_link(SlowLinkC),
  -    [receive {message_received} -> ok end || _ <- lists:seq(1,4)],
  +    wait_until_notification(4),
       ct:pal("write C done"),
       print_prbr_data(),
   
  
positive.code:           end),
  
      % wait until A has written the two remaining replicas
      [receive {message_received} -> ok end || _ <- lists:seq(1,2)],
  
      % write B should now trigger a write through which should finish write A
      % once write B retries, a notification should be sent to write A
  
negative.code:                             [["TestWrite"]]]),
  
      remove_slow_link(Link),
      wait_until_notification(1),
  
      %% all replicas should have received the written value
      ?equals(prbr_values(), [[["TestWrite"]],
  