Added logic for recursive otooling