add dedupe_pair and remove_overlaps