QR Finally implemented