Alfred - sorting logic for threads