replace ALLBBj added recursion