Added API for tensors