       valid_status_weight = %{online: 1, degraded: 2, critical: 3}
 
       update = Map.keys(effective.services)
+
+
       Enum.reduce(update, true, fn(service, acc) ->
-        candidates = Enum.reduce(servers, [], fn (server, acc2) ->
-        s = server.services[service]
+        candidates = Enum.reduce(servers, [], fn ({server_id, server}, acc2) ->
+          s = server.services[service]
           cond do
             MapSet.member?(valid_status, server.status) && s && MapSet.member?(valid_status, s.status) ->
               acc2 ++ [%{identifier: s.identifier, server_status: server.status, server_index: server.health_index, service_status: s.status, service_index: s.health_index, index: server.health_index + s.health_index}]
-            true -> acc2
+            true ->
+              acc2
           end
         end)
 

        if master == node() do
          effective = Noizu.SimplePool.Database.MonitoringFramework.NodeTable.read!(node()) || initial
          effective = put_in(effective, [Access.key(:master_node)], master)
          state = state
                  |> put_in([Access.key(:entity), :effective], effective)
                  |> put_in([Access.key(:entity), :default], initial)

        put_in(acc, [Access.key(:services), k], v)
      end)

      state = state
              |> put_in([Access.key(:entity), :effective], effective)
              |> put_in([Access.key(:entity), :effective, Access.key(:status)], :online)
              |> put_in([Access.key(:entity), :status], :online)

      %Noizu.SimplePool.Database.MonitoringFramework.NodeTable{
        identifier: state.entity.effective.identifier,
        status: state.entity.effective.status,
        directive: state.entity.effective.directive,
        health_index: state.entity.effective.health_index,
        entity: state.entity.effective
      } |> Noizu.SimplePool.Database.MonitoringFramework.NodeTable.write!()

      update_hints(effective, context, options)

      {:noreply, state}
    end
