Added ranking functions to the API