finished collapseDulplicates