added modified traffic-gen code