updated script for finding duplicaes