Stop cycling if cycles or threshold. Test this.