expose flow object to mutate function

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