checking for duplicate entries