finalizing calc_residue_flow parent to children step
resolving conflicts from last commit