fixed cycle creation, added test for it
more cycle tests