rewrite L2Pooling