added temporal pooling, untested