added tensor index injection