check for duplicates