ranking for all paths method update