Change the adust_ranks method from instance method to class method