added Set_to_diagonal_matrix