find cycles