in case there are duplicates in the data