hasCycle