added lin alg functions