added tensor trace