implemented recLinReg.save in JS