               }}
             end
           end) |> Enum.into(%{})
+          data = set_highest_bid(data)
         else
           seller_bids = [{id, bid} | data.seller_bids]
           if is_nil(data.lowest_bid) or bid < elem(data.lowest_bid, 1) do

    end)
  end

  def handle_received(data, %{"action" => "bid", "params" => bid}, id) do
    participant = Map.get(data.participants, id)
    participant_actions = %{}


    case participant do
      # Seller
      %{role: "seller", bidded: bidded, bid: previous_bid, money: money, dealt: false} when not is_nil(money) and bid >= money ->
        if previous_bid != nil do
          data = %{data | seller_bids: List.delete(data.seller_bids, {id, previous_bid})}
          if not is_nil(data.lowest_bid) and elem(data.lowest_bid, 0) == id do
            data = set_lowest_bid(data)
          end
        end
        if not is_nil(data.highest_bid) and bid <= elem(data.highest_bid, 1) do
          now = DateTime.today()
          buyer_id = elem(data.highest_bid, 0)
          deals = [{bid, now, {id, buyer_id}} | data.deals]
          buyer_bids = List.delete(data.buyer_bids, data.highest_bid)
