change rankCol function