created addFlow and implemented interleaving of packets