added linear algebra stuff