checking for duplicates