Adding the flow structure