Revert "use a set"

This reverts commit dd5109ee69f9d29107d818f64506b6b114069683.