update dedup logic