let to_list hash =
       fold (fun k v xs -> (k,v) :: xs) hash []