dupe checking in db