use set to eliminate duplicates