         {:noreply, ring}
       true ->
         new_up_set = MapSet.delete(ring.up_set, n)
-        {:ok,new_node_set} = delete(ring.node_set,{node(),ring.counter + 1},n)
+        {:ok, new_node_set} =
+          delete(ring.node_set, {node(), ring.counter + 1}, n)
         {ring, _} =
          update_ring(%GenServerring{ring | up_set: new_up_set},
            %{node_set: new_node_set, payload: ring.payload, from_node: []})

    GenServer.cast(server, {:del_node, node})
  end

  def all(server), do: GenServer.call(server, :get_all)
  def up(server), do: GenServer.call(server, :get_up)

  # classic GenServer callbacks
  def handle_call(:get_all, _, ring), do: {:reply, get_set(ring.node_set), ring}
  def handle_call(:get_up, _, ring) do
    {:reply, MapSet.to_list(ring.up_set), ring}
  end
  def handle_call(:get_ring, _, ring), do: {:reply, {:ok, ring}, ring}
  def handle_call(other, from, ring) do
    payload = ring.payload
    up_load = fn(load) -> update_payload(ring, load) end

  use GenServer
  require Crdtex.Set

  defstruct(
    node_set: Crdtex.Set.new,
    up_set: MapSet.new,
    forced_down: Crdtex.Set.new,
    payload: nil,
    counter: 0,
    callback: nil)

  defmacro __using__(_), do: []

