added cap allocator