added beta_p assignment on outflow