added a duplicates procedure