should emit the function values ids sorted by rank