simplify rank iteration