changed allocator to pool/stack