GenerateTraffic function is edited