Updated use of set() to modern built-in