implemented avgConnectedSpan