Ranking function in utility + new tests + some parts for slave