script for latency computing added