change ip selection algorithm