optimized QR