nick added files for finding cycles