generalized cyclic detection