Updated ranking functions.