implemented the ability to find cycles instead of filtering them out.