setting up flow