modified slow betweenness calculation