linReg and Factory implemented, tested