Could you return a `set` instead? Might be a bit simpler/clearer