Implement filtering duplicates