remove return_residual