implement Tensor