tests done. TODO: reason about closeness and betweenness.