Added Tensor Code