modify rank related functions