The second order pooling code