added average latency plot