extend allocator, add test