checking for duplicate entries anywhere