working linalg and svd