add subsampling pooling codes