setup the flow