Added par_flow function and import scipy