diagonalize D but is useless