replace the n.n implementation of kendall distance with the implementation in n.log(n)