Added search for duplicates