sets up flow