add rank and advice function