putback in the residual calculation - makes final result better