fixes #5, using non recursive cycle killing algorithm