   end
 
   # small utilities functions
+  defp value(payload), do: Crdtex.value(payload)
+
+  defp get_set(set), do: Crdtex.value(set)
+
+  defp contain?(set, e), do: Crdtex.value(set, {:contains, e})
+
+  defp add(set, actor, e), do: Crdtex.update(set, actor, {:add, e})
+
+  defp delete(set, actor, e), do: Crdtex.update(set, actor, {:remove, e})
+
+  defp merge(nil, crdt), do: crdt
+  defp merge(crdt, crdt), do: crdt
+  defp merge(crdt1, crdt2), do: Crdtex.merge(crdt1, crdt2)
+
+  defp get_ring(server), do: GenServer.call(server, :get_ring)
+
+  defp up_nodes(ring) do
+    MapSet.difference(ring.up_set, MapSet.new(get_set(ring.forced_down)))
+  end
+
   defp monitor(list) do
     list = List.delete(list, node())
     Enum.each(list, fn(n) -> Node.monitor(n, :true) end)

  defp gen_ring(set, up, payload, counter, callback, forced_down) do
    %GenServerring{node_set: set, up_set: up, forced_down: forced_down,
      payload: payload, counter: counter, callback: callback}
  end

  defp get_ring(server), do: GenServer.call(server, :get_ring)

  defp up_nodes(ring) do
    MapSet.difference(ring.up_set, MapSet.new(get_set(ring.forced_down)))
  end

  defp update_payload(ring, payload) do

    end
  end

  defp ring_reconcile([n], gossip, ring) do
    case contain?(ring.forced_down, n) do
      true -> {:noreply, ring} # must ignore gossips from forced_down nodes
