topologic distance method implemented.