impl distance variant of stress centrality algo