add diagonalization