making this a `TreeSet` gets rid of some more lines further below