added for loop to add arbitrary number of flows