duplicate detection tutorial