move getDistance to EdgeInfo