replace the flow