Add "rank" to variables and API