tests added and cycle detection removed