added forward regression and compute function