works with new allocator