Use max depth to limit recursion
Merge find_comp and find_iso