generalized todo cycling