          {:element res :collection %2}))
     nil [:groups :settlements :political-entities]))
 
-(defn by-id [game id]
+(defn by-id
   "Return the element associated to the id"
+  [game id]
   (:element (by-id-with-collection game id)))
 
 (defn required-by-id [game id]

            gs (conj gs group-id)]
        (assoc pe :groups gs)))))

(defn- by-id-with-collection [game id]
  "Return the element associated to the id"
  (reduce
    #(let
       [res (get-in game [%2 id])]

    (required-by-id game (:political-entity-id group))
    (catch IllegalArgumentException e
      (throw (IllegalStateException. (str "Political entity for group " group " not found") e)))))

(defn society [game el]
  (.society (to-political-entity game el)))
