Made threshold return a set of T instead of a single T