made default svd more robust
added qr decomposition