use array instead of set