check for dupes correctly