trace not a function, sum(diag())