modified Queue to use allocator