integrate Tarjans; need to modify Python