[New] Added remove_duplicates function