Trying the set-like approach, since it saves ~10 LOC.