updating the flow