let add_no_dup x l =
  if mem x l then l else x :: l