finished implementing QR algorithm for quadratic matrices