02.03.14 fixed and rewrote lm and qr internals