update the flow