use a set instead of keys