implemented LOOP parameter (number of packets)