use array instead of ordered set