pooling with tensors