       )
       error ->
       (
-        log_error(request_url, error, api_response)
+        log_error(request_url, error, response)
         error
       )
     end)
 
-    api_response = update_in api_response.parsed_response, fn
+    response = update_in response.parsed_response, fn
       {:ok, map} ->
         cast_load(map)
       response ->
         response
     end
 
-    do_log(api_response)
+    do_log(response)
   end
-
 
   def do_log(response) do
     with {:error, e} <- response.raw_response,

    data = Poison.encode!(world, me: id)
    url = (url <> "/move")

    api_response = url
    |> request.(data, ["content-type": "application/json"], [])
    |> Response.new(as: %{})

    api_response = put_in(api_response.url, url)

    update_in(api_response.parsed_response, fn
      {:ok, map} ->
      (
        {:ok, map}
      )
      error ->
      (
        log_error(url, error, api_response)
        error
      )
    end)

    api_response = update_in api_response.parsed_response, fn
      {:ok, map} ->
        cast_move(map)
      response ->
        response
    end

    do_log(api_response)
  end

  def cast_move(map) do

    request_url = url <> "/start"
    data = Poison.encode!(data)

    response = request_url
    |> request.(data, ["content-type": "application/json"], [])
    |> Response.new(as: %{})

    response = put_in(response.url, url)

    update_in(response.parsed_response, fn
      {:ok, map} ->
      (
        {:ok, map}
      )
      error ->
      (
        log_error(url, error, response)
        error
      )
    end)

    response = update_in(response.parsed_response, fn
      {:ok, snake} ->
      (
        snake = put_in(snake["url"], url)
