Add cycle mode; add additional constraint on the number of nodes