rank idx in function ranking