added multivariate regression code