removed print and residuals