trying to fix infinite loop with advanced many_dogs