factorization for pooling