new rank update algorithm