adding more sophisticated allocator