use ordered_sample! when k > 10n