finish qr decomposition