use set instead of array