Using a set instead of a list