replaced old linear algebra library