correct docs; does not always use sort_r