changed entity container to a map (not a vector)