rewrote to speed up loading of sets?