added getConnectionDistance