Use a Set to handle duplicates