naive dedup added, not tested