scripts to check for duplicates