add contract to resource and allocator implementation