expose Flow object through mutate function when run method is called

add a hook method mutate, so when calling the run method, the flow object can be passed out for further actions