detection de cycle