used set instead of list to avoid duplicates