   """
   def hash(%State{} = state) do
     # hash function to make a relatively cheap hash of the passed in datastructure.
-    floors = Enum.map(state.floors, &Hashable.hash/1)
+    floors =
+      Enum.map(Enum.with_index(state.floors), fn {floor, floor_no} ->
+        "F#{floor_no}:#{Hashable.hash(floor)}"
+      end)
+
     Base.encode16(:crypto.hash(:sha256, "#{state.elevator_location}:#{floors}"))
   end
 

        hops: state.hops + 1
    }

    Map.update(new_state, :cost, 0, fn _ -> State.cost(new_state) end)
  end

  def is_end?(%State{} = state) do

        hops: state.hops + 1
    }

    new_state
    |> Map.update(:cost, 0, fn _ -> State.cost(new_state) end)
    |> Map.update(:hash, "", fn _ -> State.hash(new_state) end)
  end

  def apply(state, {:down, items}) do
