Fixed cycles

Fixed cycles, according to zadacka work.
Therefore, lines about loopcnt and boundcnt have been commented out.