Add support for duplicate detection