fitted and residuals methods added