add feature to remove_duplicates