The update in sets is equivalent to a Union, this line doesn't have any effect in potentialLocations although you do want to do the intersection with the whitelist as it was done for possibleLocations.