tensor almost working

tensor almost working