Magnetic excitations and dynamical Jahn-Teller distortions in UO 2