added pooling layer type, some fixes