implemented resource pool algorithm