added structure for linear regression, getting type error