added qr decomposition steps